#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
	QMainWindow(parent),
	ui(new Ui::MainWindow)
{
	ui->setupUi(this);

	setCentralWidget(&pd);
}

MainWindow::~MainWindow()
{
	delete ui;
}

void MainWindow::on_actionOpen_triggered()
{
    QFileDialog fd;
//	fd.setDirectory(QDir(QDir::homePath().append("Documents/Research/SAGEnext/THESIS/Dissertation/data")));
	fd.setOption(QFileDialog::ReadOnly);
	fd.setOption(QFileDialog::ShowDirsOnly, false);
	
	if(fd.exec()) {
		QStringList f = fd.selectedFiles();
		pd.init(f.at(0));
	}
}

void MainWindow::on_actionExit_triggered()
{
    close();
}
